package com.tushare.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tushare.entity.Daily;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-03-08
 */
public interface DailyMapper extends BaseMapper<Daily> {

    Daily getLastDaily();

    List<Daily> getDailyListByTsCode(@Param("ts_code") String ts_code, @Param("trade_date") int trade_date);

    Daily getLastDailyByTsCode(@Param("ts_code") String ts_code);

    boolean saveOrUpdateBatch(@Param("list") List<Daily> list);

    boolean deleteAllDaily();

}
